<template>
  <el-dialog title="查看客户信息"
             :visible.sync="dialogForm"
             width="1100px">
    <el-form :inline="true"
             ref="form"
             :model="form"
             class="add-form"
             label-width="110px">
      <h3>客户基础信息</h3>
      <hr>
      <br />
      <el-row>
        <el-col :span="8"
                class="el-height">客户名称：{{form.name}}</el-col>
        <el-col :span="8"
                class="el-height">客户简称：{{form.shortName}}</el-col>
        <el-col :span="8"
                class="el-height">客户单位代码：{{form.customerCode}}</el-col>
        <el-col :span="8"
                class="el-height">社会信用代码：{{form.creditCode}}</el-col>
        <el-col :span="8"
                class="el-height">法定代表人：{{form.legalPerson}}</el-col>
        <el-col :span="8"
                class="el-height">联系人：{{form.linkMan}}</el-col>
        <el-col :span="8"
                class="el-height">联系电话：{{form.linkTel}}</el-col>
        <el-col :span="8"
                class="el-height">企业性质：{{form.entNature}}</el-col>
        <el-col :span="8"
                class="el-height">上级单位：{{form.parentOrgName}}</el-col>
        <el-col :span="8"
                class="el-height">注册资本（万元）：{{form.regeditAmount}}</el-col>
        <el-col :span="8"
                class="el-height">成立日期：{{form.regDate}}</el-col>
        <el-col :span="8"
                class="el-height">注册地址：{{form.regAddress}}</el-col>
        <el-col :span="8"
                class="el-height">办公地址：{{form.address}}</el-col>
        <el-col :span="8"
                class="el-height">主营信息：{{form.busScope}}</el-col>
        <el-col :span="8"
                class="el-height">备注：{{form.remark}}</el-col>
      </el-row>
      <h3>客户银行信息</h3>
      <hr>
      <br />
      <el-row style="margin-bottom: 18px;">
        <el-col :span="24">
          <el-table :data="form.customBank"
                    border>
            <el-table-column label="序号"
                             type="index"
                             width="50">
            </el-table-column>
            <el-table-column prop="bankAccountTypeDesc"
                             label="账户类型"
                             min-width="120">
            </el-table-column>
            <el-table-column prop="openBank"
                             label="开户银行"
                             min-width="120">
            </el-table-column>
            <el-table-column prop="bankNo"
                             label="银行账号"
                             min-width="120">
            </el-table-column>
            <el-table-column prop="bankName"
                             label="账户名称"
                             min-width="120">
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
      <h3>客户账户信息</h3>
      <hr>
      <br />
      <el-row>
        <el-col :span="24">
          <el-table :data="form.cargoOwnerAccounts"
                    border>
            <el-table-column label="序号"
                             type="index"
                             width="50">
            </el-table-column>
            <el-table-column prop="name"
                             label="货主名称"
                             min-width="204">
            </el-table-column>
            <el-table-column prop="mnemonicCode"
                             label="助记码"
                             min-width="150">
            </el-table-column>
            <el-table-column prop="accountTypeDesc"
                             label="账户类型"
                             min-width="150">
            </el-table-column>
            <el-table-column prop="accountNatureDesc"
                             label="账户性质"
                             min-width="150">
            </el-table-column>
            <el-table-column prop="pallets"
                             label="是否托盘账户"
                             min-width="150">
              <template slot-scope="scope"> {{ scope.row.pallets | _filterTrueOrFalse }}</template>
            </el-table-column>
            <el-table-column prop="ifSteelMillUnit"
                             label="是否钢厂单位"
                             min-width="150">
              <template slot-scope="scope">{{ scope.row.ifSteelMillUnit | _filterTrueOrFalse}}</template>
            </el-table-column>
            <el-table-column prop="overdueTypeDesc"
                             label="逾期类型"
                             min-width="150">
            </el-table-column>
            <el-table-column prop="overdueValue"
                             label="逾期值（天/元）"
                             min-width="150">
            </el-table-column>
            <el-table-column prop="transferFee"
                             label="是否收转库费"
                             min-width="150">
              <template slot-scope="scope">{{ scope.row.transferFee | _filterTrueOrFalse}}</template>
            </el-table-column>
            <el-table-column prop="statistics"
                             label="报表是否统计"
                             min-width="150">
              <template slot-scope="scope">{{ scope.row.statistics | _filterTrueOrFalse}}</template>
            </el-table-column>
            <el-table-column label="附件信息"
                             width="280"
                             align="center">
              <template slot-scope="scope">
                <download v-model="scope.row.attachments"></download>
              </template>
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer">
      <el-button @click="dialogForm = false">返 回</el-button>
    </div>
  </el-dialog>
</template>

<script>
import download from '@/components/download'

export default {
  name: 'viewCustomerForm',
  components: { download },
  data() {
    return {
      form: '',
      dialogForm: false
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.el-height {
  margin: 10px 0;
}
</style>
